import request from '@/utils/request'

//新增
export function createadd(data){
    return request({
        url: 'enroll/create',
        method: 'post',
        data
      })
}

//获取关联校区
export function getOption(){
    return request({
        url: 'school/option',
        method: 'get'
      })
}

//获取列表数据
export function getListenroll(data){
    return request({
        url: 'enroll',
        method: 'get',
        params:data
      })
}

// 修改线上展示状态

export function updatestate(data){
    return request({
        url:'enroll/updatestate',
        method:'put',
        data:data
    })
}

//編輯
export function readData(data){
    return request({
        url: 'enroll/read',
        method: 'get',
        params:data,
        headers:{
          'showLoading':false
        }
      })
}

//修改
export function updateData(data){
    return request({
        url: 'enroll/update',
        method: 'put',
        data:data,
        headers:{
          'showLoading':false
        }
      })
}

// 刪除
export function deleteItem(data){
    return request({
        url: 'enroll/delete',
        method: 'delete',
        data:data
      })
}
